﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Trigger + "/" + SkillEditorConst.ExecuteSkill, typeof(SkillEditorGraph))]
    public class SkillTriggerNode_ExecuteSkill : SkillTriggerNode
    {
        protected override ESkillTriggerType type => ESkillTriggerType.ExecuteSkill;

        [InspectorName("技能类型")] public ESkillType skillType = ESkillType.None;
        [InspectorName("释放者关系")] public ETargetRelation relation = ETargetRelation.None;
        [InspectorName("是否包含技能触发")] public bool trigger;
        [InspectorName("目标是否为释放者")] public bool inputExecuter = true;

        protected override SkillCustomConfig CreateConfig()
        {
            return new SkillTrigger_ExecuteSkill_ConfigData()
            {
                skillType = (int)this.skillType,
                relation = (int)this.relation,
                trigger = this.trigger,
                inputExecuter = this.inputExecuter
            };
        }
    }
}